<?php
class UserViewModel extends Model
{
	protected $viewModel = true;
	 
	// 视图模型中的字段定义 
	protected $viewFields = array( 
		"User"=>array("user_login", "user_email", "user_registered"),
		"Usermeta"=>array("display_name","user_picture","qq","msn","age","location")
	);

	// 视图关联的where条件 
	protected $viewCondition = array(
		"User.ID" => array("eqf","Usermeta.user_id")
	);
	
	// 视图模型的主键
	Public function getPk() { 
		return "User.ID"; 
	}
}
?>